gtk_init: Fix debug flags handling when a display is already open
authorChristoph Reiter <creiter@src.gnome.org>
Sun, 18 Feb 2018 09:34:52 +0000 (10:34 +0100)
committerChristoph Reiter <creiter@src.gnome.org>
Mon, 19 Feb 2018 18:24:00 +0000 (19:24 +0100)
commit8ad81a35e1e5d72b50e93adcead9def4a083f6e0
tree17d25264b0edd7d5c828e109a5e4c67479584370
parent9ea80a7506ac8d9271509775b725c6748fcdf9a1
gtk_init: Fix debug flags handling when a display is already open

The code assigning the display to the debug_flags struct gets only
called when the default display changes, which never happens
when there already is one.

This makes it call the change callback in case a display is already
there.

The same fix was applied to gtk3 in !26 where calling gdk_init()
before gtk_init() would trigger this case. With gdk_init() gone
in master this is less likely to happen, but still possible
if gdk_display_open() is called before gtk_init().

See https://gitlab.gnome.org/GNOME/pygobject/issues/166
gtk/gtkmain.c